Skip to content

Add Osiris designer-menu differential capture#22

Merged
jserv merged 2 commits into
mainfrom
fix
Jun 25, 2026
Merged

Add Osiris designer-menu differential capture#22
jserv merged 2 commits into
mainfrom
fix

Conversation

@jserv

@jserv jserv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Wire the existing osiris-designer-menu.replay into both sides of the differential harness as a fifth demo. The system (xdotool) side gets its wait-window timeouts bumped to 15000ms via awk so the real Xlib window has time to map on a loaded runner; the compat side keeps the internal in-process backend and gains --in-process-snapshots.

Replace the fixed 'sleep 1' after Xvfb launch with wait_for_display(), which polls xdotool getdisplaygeometry and bails if the Xvfb pid dies, and trap INT TERM HUP so the EXIT cleanup runs on signals.


Summary by cubic

Adds the Osiris designer-menu replay to the differential harness and makes in-process snapshots include popup menus so diffs match the system side. Also hardens display startup and signal handling, and bumps the changed-ratio gate to 0.55 to avoid false diffs in the designer demos.

  • New Features

    • Added osiris-designer-menu.replay as the fifth demo on system (xdotool) and compat (internal).
    • System rewrites wait-window to 15000ms via awk; compat uses --in-process-snapshots with the internal backend.
  • Bug Fixes

    • Wait for Xvfb by polling xdotool getdisplaygeometry; trap INT/TERM/HUP so EXIT cleanup runs.
    • In-process snapshots now composite override-redirect popups (Qt menus) onto the target to match whole-screen captures.
    • Snapshots write to a temp then atomically rename to avoid truncated BMPs on polling runners.

Written for commit 8b271b7. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv jserv force-pushed the fix branch 2 times, most recently from 026c82b to a22e5d2 Compare June 24, 2026 14:48
jserv added 2 commits June 25, 2026 10:39
The in-process snapshot reads only the replay-target window's surface.
Override-redirect shells (Qt popup menus and the like) render into their
own borderless SDL windows, so a snapshot of a window with an open menu
omits the menu, while a whole-screen capture (the system side's import)
includes it.

composeOverlayPopups() blits every mapped override-redirect top-level
onto a copy of the target surface in stacking order before the BMP is
written, so the single-window read matches a whole-screen capture. The
copy uses SDL_CreateRGBSurfaceWithFormat plus a base blit rather than
SDL_DuplicateSurface, which the older SDL2 on the differential runners
does not export. Snapshots of popup-free windows are unaffected: the
helper returns NULL and the target surface is saved unchanged.
Wire osiris-designer-menu.replay into both sides of the differential
harness as a fifth demo: the system side drives it with xdotool, the
compat side with the internal in-process backend and in-process
snapshots. The replay opens the Designer File menu, which the popup
compositing in the snapshot path captures on the compat side.

Harden the run while adding load: replace the fixed post-Xvfb sleep with
wait_for_display(), which polls xdotool getdisplaygeometry and bails if
the Xvfb pid dies, and trap INT/TERM/HUP so the EXIT cleanup runs on
signals. Bump system-side wait-window timeouts to 15000ms via awk so the
real Xlib window has time to map on a loaded runner.

Raise OSIRIS_DIFF_CHANGED_THRESHOLD to 0.55: the designer windows
diverge 45-48% at the pixel level between real Xlib-Qt and
libx11-compat-Qt (anti-aliasing, font subpixel), with designer-initial
already at 0.45. The divergence is cosmetic, not a regression; the
file-menu MAE is 0.056, far under the 0.16 MAE gate that stays the real
fidelity bar.
@jserv jserv merged commit 56e64be into main Jun 25, 2026
16 checks passed
@jserv jserv deleted the fix branch June 25, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant